package com.nuc.dip1;

/**
 * Time    : 2023/3/24 21:58
 * Author  : 王摇摆
 * FileName: Benz.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */

public class Benz {
    private String carName;

    public Benz(String carName) {
        this.carName = carName;
    }

    public String getCarName() {
        return carName;
    }

    public void run(String driver){
        System.out.println(driver+" can drive "+this.getCarName());
    }
}
